package com.centit.suixuan.puremvc.controller
{
	import com.centit.suixuan.puremvc.model.ImageProxy;
	import com.centit.suixuan.puremvc.model.UserProxy;
	import com.centit.suixuan.puremvc.view.ImageMediator;
	import com.centit.suixuan.puremvc.view.MainMediator;
	
	import org.puremvc.as3.interfaces.ICommand;
	import org.puremvc.as3.interfaces.INotification;
	import org.puremvc.as3.patterns.command.SimpleCommand;
	
	import spark.components.Group;

	public class ImageCommand extends SimpleCommand implements ICommand
	{
		public function ImageCommand()
		{
		}
		
		override public function execute(notification:INotification):void
		{
			var obj : Object = notification.getBody();
			var mainApplication : MainApplication = obj.mainApplication as MainApplication;
			var imgPanel : Group = obj.imgPanel as Group;
			
			facade.registerProxy(new ImageProxy(ImageProxy.NAME));
			
			facade.registerMediator(new ImageMediator(ImageMediator.NAME, imgPanel));
		}
		
		
	}
}